import request from '../utils/request'

// 根据id查询供应商
export function getById (id) {
  return request.get(`/supplier/${id}`)
}

// 获取供应商列表
export function getSupplier (params) {
  return request.get('/supplier', { params: params })
}

// 添加供应商
export function addSupplier (data) {
  return request.post('/supplier', data)
}

// 修改供应商信息
export function modSupplier (id, data) {
  return request.put(`/supplier/${id}`, data)
}

// 删除供应商信息
export function deleSupplier (id) {
  return request.delete(`/supplier/${id}`)
}
